// Author: combacsa@kaist.ac.kr
// http://www.jungol.co.kr/prog/Hanal/hanalView.php?qs_code=119

//#define COMPILE
#ifdef COMPILE

#include <iostream>
#include <fstream>
#include <time.h>
using namespace std;

void whoa() {
	int a = 0;
	time_t now;
	struct tm tt;
	time(&now);
	tt = *localtime(&now);
	cout << a << endl;
	a = tt.tm_year;
	cout << a << endl;
	a += tt.tm_mon;
	a += tt.tm_mday;
	cout << a << endl;
}

int main() {
	//whoa();
	ofstream out("output.txt");
	out << "0" << endl << "112" << endl << "141" << endl;
	out.close();

	return 0;
}
#endif
